home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / pc / files / p_misc / netconf.arc / UPDATE.TXT < prev   
Text File  |  1988-12-10  |  32KB  |  728 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.                     Amateur TCP/IP: An Update
  11.  
  12.  
  13.                        Phil R. Karn, KA9Q
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20. _1.  _I_n_t_r_o_d_u_c_t_i_o_n
  21.  
  22.      Amateur  radio  use  of   the   DARPA   Internet   protocols
  23. (``TCP/IP'')  has grown from a paper proposal during the ``proto-
  24. col wars'' of several years ago  to  a  well-established  reality
  25. today.   Because  the  TCP/IP  software  is free and available to
  26. radio amateurs and all other noncommercial users, it is  hard  to
  27. say  exactly  how  many  are using it.  One rough estimate is the
  28. number of Internet addresses that have  been  assigned  from  the
  29. ``network  44''  block for amateur packet radio: about 1,000 ama-
  30. teurs in several dozen countries.  The package  has  also  gained
  31. considerable  popularity  outside of amateur radio, especially in
  32. universities.
  33.  
  34.      With the popularity of TCP/IP  on  amateur  radio  has  come
  35. another most welcome development: the appearance of others making
  36. substantial contributions to the software effort by creating  new
  37. features and enhancing existing ones.  Several of these contribu-
  38. tors have documented their work in other papers in these proceed-
  39. ings, and any other potential contributors are also encouraged to
  40. do so.  In this paper I will review the TCP/IP  developments  and
  41. experiments  of  the  past year.  Although I will mention several
  42. contributors by name, the project has grown much  too  large  for
  43. this  to  be an exhaustive list; I hope no one will feel slighted
  44. if they are accidentally omitted.
  45.  
  46.      In this paper I will also comment on  some  of  the  lessons
  47. learned  so  far,  and  then  discuss possible directions for the
  48. future.  As expected, much has been learned about the operational
  49. aspects  of  true  computer  networking  on amateur packet radio.
  50. We've also learned quite a bit about coordinating the development
  51. of  a complex software package when volunteers all over the world
  52. are involved.
  53.  
  54. _2.  _N_e_w _F_e_a_t_u_r_e_s _a_n_d _E_n_h_a_n_c_e_m_e_n_t_s
  55.  
  56.  
  57. _2._1.  _A_X._2_5 _S_u_p_p_o_r_t
  58.  
  59.      A complete AX.25 Level 2 implementation has  been  added  to
  60. the  package.  Its  primary  purpose  is  to  provide  hop-by-hop
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73. acknowledgement of IP datagrams without having to rely on TCP for
  74. end-to-end  retransmission.   IP  datagrams  may  now  be carried
  75. either in connected-mode I frames that are  acknowledged  at  the
  76. link layer, or in AX.25 UI frames as before. The default encapsu-
  77. lation  mode  is  set  in  the  configuration  file.   Individual
  78. datagrams can override the default with the type of service (TOS)
  79. bits in the IP header.
  80.  
  81.      An optional ``transparent fragmentation'' facility breaks up
  82. large  IP datagrams into a series of AX.25 I frames for transmis-
  83. sion over poor links without  added  TCP/IP  overhead.  This  was
  84. implemented as a local extension to the AX.25 protocol.
  85.  
  86.      AX.25 can also be used directly  from  the  keyboard  (i.e.,
  87. without  TCP/IP) for communication with ordinary packet stations.
  88. Because of the multiplexing provided by  the  AX.25  Protocol  ID
  89. byte,  ``conventional'' AX.25 and TCP/IP/AX.25 operation can take
  90. place simultaneously, even between the same pair of stations.
  91.  
  92.      With minor exceptions, the AX.25 code  tracks  the  proposed
  93. AX.25  Version  2.1  specification  currently under review by the
  94. ARRL Digital Committee. The code has been recently  rewritten  to
  95. adhere to the SDL diagrams by K3NA as closely as possible.
  96.  
  97. _2._2.  _I_P-_o_n-_N_E_T/_R_O_M
  98.  
  99.      A separate paper in these proceedings by  Dan  Frank,  W9NK,
  100. documents  an  important contribution to the package: the ability
  101. to pass IP datagrams through NET/ROM networks.  This is very much
  102. in  keeping  with a fundamental principle of internetworking that
  103. accounts for much of TCP/IP's success: the ability to use facili-
  104. ties  that  were  designed  by  others without internetworking in
  105. mind.  Dan's paper discusses  in  detail  the  specific  approach
  106. taken and its advantages and disadvantages.
  107.  
  108. _2._3.  _P_a_c_k_e_t _D_r_i_v_e_r _S_u_p_p_o_r_t
  109.  
  110.      FTP Software, Inc, has released into the public  domain  its
  111. interface   specification  for  packet-oriented  hardware  device
  112. drivers on the IBM PC. Packet drivers run as Terminate  and  Stay
  113. Resident  (TSR)  modules.   They  are loaded independently of the
  114. protocol modules that use it  (e.g.,  the  net.exe  program  that
  115. implements  TCP/IP on the PC), and they can be shared by multiple
  116. protocol  modules  under  a  multitasker  such  as  DoubleDos  or
  117. DesqView.
  118.  
  119.      A major practical advantage of the packet driver approach is
  120. that  the  driver  software  can be developed and maintained com-
  121. pletely independently of the protocol code.  Since the drivers no
  122. longer  need  reside  in net.exe, the latter can be much smaller;
  123. users need not waste disk space or memory on drivers for  devices
  124. they don't have.
  125.  
  126.      As  the  packet  driver  specification  becomes  a  de-facto
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139. standard,  we will be able to use drivers written by others.  TRW
  140. had already contributed its PC-2000 Ethernet card driver  when  I
  141. added  packet  driver  support  to net.exe. Russ Nelson has since
  142. written packet drivers for the Interlan  NI5120  and  3Com  3C501
  143. Ethernet  cards,  and Bob Clements, K1BC, has written one for the
  144. Western Digital WD8003 Ethernet card.
  145.  
  146. _2._4.  _O_t_h_e_r _D_r_i_v_e_r_s
  147.  
  148.      Art Goldman, WA3CVG, and Richard Bisbey, NG6Q, have  contri-
  149. buted a driver for the Eagle HDLC interface card.  This card, for
  150. a time a popular item at swapmeets, features the Zilog 8530 chip.
  151. They  started  with an 8530 driver I wrote for the PACCOMM PC-100
  152. and added many performance enhancements.
  153.  
  154. _2._5.  _R_o_u_t_i_n_g
  155.  
  156.      Al Broscius, N3FCT, has written automatic routing  code  for
  157. the  package.  The  protocol  is the widely-used ``RIP'' (Routing
  158. Information Protocol) that has been  the  informal  standard  for
  159. several  years  with Berkeley UNIX systems.  (Berkeley adopted it
  160. from XNS, the Xerox Network System.) RIP belongs to the class  of
  161. routing  algorithms  known  variously as ``Bellman-Ford,'' ``Dis-
  162. tance Vector,''  or  ``The  Old  ARPANET  Algorithm.''  NET/ROM's
  163. internal  routing  algorithm  is  also in this class, although it
  164. differs in detail from RIP.  Al's contribution is  intended  pri-
  165. marily for Ethernet LANs where RIP is already common.
  166.  
  167. _2._6.  _E_l_e_c_t_r_o_n_i_c _M_a_i_l
  168.  
  169.      The original mail  subsystem  by  Bdale  Garbee,  N3EUA  and
  170. myself  has  been  greatly  extended and enhanced by Dave Trulli,
  171. NN2Z.  Dave and Bob Gibson, WA3PXX, have  also  each  implemented
  172. automatic SMTP/W0RLI mail forwarding systems.  This is a particu-
  173. larly useful feature as it allows those running TCP/IP systems to
  174. receive  ``regular'' packet mail without having to log into a BBS
  175. manually.
  176.  
  177. _2._7.  _A_d_d_i_t_i_o_n_a_l _A_p_p_l_i_c_a_t_i_o_n_s _a_n_d _F_e_a_t_u_r_e_s
  178.  
  179.      Several useful  applications  have  also  been  contributed.
  180. Mike  Horne,  KA7AXD, has written a ``finger'' server.  This is a
  181. popular ARPA application that allows one  to  locate  (``put  the
  182. finger  on'')  a person on a remote system.  It is a handy way to
  183. make information such as your telephone number or electronic mail
  184. address available for the convenience of those wishing to contact
  185. you.  Mike has also written an AX.25 ``mailbox'' that  makes  the
  186. package more useful with conventional packet stations.
  187.  
  188.      I have added several simple features that make it easier  to
  189. run  the  code  at a remote site. A ``remote'' server and command
  190. allow control stations to reboot the  system  with  new  software
  191. and/or  configuration  files,  and  a ``forward'' command handles
  192. simplex links such as those found in the collision free  backbone
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205. node described later.
  206.  
  207. _3.  _I_n_t_e_r_n_a_l _C_h_a_n_g_e_s
  208.  
  209.      In addition to the new externally visible features that have
  210. been described, quite a few changes have been made under the sur-
  211. face.  While perhaps not of direct interest to those  who  simply
  212. use the package, these changes are important because they improve
  213. performance, reliability and portability, or make it  easier  for
  214. programmers to create new applications.
  215.  
  216. _3._1.  _C_o_n_g_e_s_t_i_o_n _C_o_n_t_r_o_l
  217.  
  218.      A major contribution to the problem of  avoiding  congestion
  219. in  a  highly  dynamic  TCP/IP Internet has been made in the past
  220. year by Raj Jain of Digital Equipment Corporation and Van  Jacob-
  221. sen  of  Lawrence  Berkeley Laboratories.  Van's suggestions have
  222. been widely accepted by TCP implementers, and they  are  included
  223. in my TCP code.  I have also contributed to this effort by devis-
  224. ing a technique that guarantees the correctness of the round trip
  225. time measurements that TCP uses to set its retransmission timer.
  226.  
  227. _3._2.  _I_m_p_r_o_v_e_d _C_P_U _P_o_r_t_a_b_i_l_i_t_y
  228.  
  229.      The ordering of bytes within a machine  word,  the  hardware
  230. alignment  requirements  for  various  data  types, and the exact
  231. positioning of elements in a C-language structure all  depend  on
  232. the  specific  processor and compiler used. These differences can
  233. create portability problems. For  example,  early  ports  of  the
  234. package  to  the Motorola 68000 sometimes generated faults due to
  235. the 68000's requirement that short and long integers be  at  even
  236. addresses, something not required by the 8088.
  237.  
  238.      To eliminate these problems, the subroutines  that  generate
  239. and  process  protocol  headers  were  rewritten to be completely
  240. independent of these considerations.  Each protocol  module  con-
  241. tains  two  conversion  routines:  one that converts the protocol
  242. header from the external (network) format specified by the proto-
  243. col  standard  to an internal representation, and another for the
  244. inverse function.  External representations are always kept as  a
  245. simple  byte string, while the internal representation is usually
  246. a C-language structure.  With this and other changes, portability
  247. to  processors  other than the Intel 8086 family (used in the IBM
  248. PC) has been greatly improved.
  249.  
  250.      The package necessarily contains some 8086  assembler  code,
  251. despite  its  inherent  nonportability.  The assembler code is in
  252. three categories:
  253.  
  254. _3._2._1.  _I_n_t_e_r_r_u_p_t _H_a_n_d_l_e_r_s
  255.  
  256.      Since the various device drivers are  interrupt  driven,  an
  257. assembler  ``stub'' fields each interrupt.  Each stub establishes
  258. a C environment and then calls a C-language function  to  do  the
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271. ``real''  work  in  handling  the interrupt.  Although some newer
  272. compilers  (e.g.,  Turbo  C  and  Microsoft  C)  support  special
  273. ``interrupt'' functions, they appear to be primarily designed for
  274. software interrupt handlers; extra code is still required (either
  275. inline  or  regular  assembly  code)  to  make  them  function as
  276. hardware interrupt handlers.
  277.  
  278. _3._2._2.  _D_O_S _I_n_t_e_r_f_a_c_e_s
  279.  
  280.      Some assembler code is included  because  the  package  uses
  281. several  DOS  system calls that are not supported by the standard
  282. vendor-supplied C library.  While C passes function arguments  on
  283. the  stack,  DOS  and  BIOS  functions accept their parameters in
  284. registers; hence the need for special  assembler-language  inter-
  285. face functions.
  286.  
  287. _3._2._3.  _P_e_r_f_o_r_m_a_n_c_e _E_n_h_a_n_c_e_m_e_n_t_s
  288.  
  289.      Two functions were written in assembler,  even  though  they
  290. had  already  been  done  in  C.   One routine computes the ones-
  291. complement sum of a block of 16-bit integers; this  is  the  ARPA
  292. standard  checksum  algorithm.   The other does fast I/O to port-
  293. mapped devices such as the 3Com 3C501 Ethernet controller.  Writ-
  294. ing  these routines in assembler improved performance through the
  295. use of certain 8086 instructions that are unavailable directly in
  296. C.   For example, although the checksum algorithm operates on 16-
  297. bit integers, the C implementation uses long (32-bit) addition to
  298. accumulate the end-around carries.  32 bit arithmetic on the 8086
  299. is relatively expensive because the CPU is a 16-bit  unit.   How-
  300. ever,  in assembler the ADC (add with carry) instruction makes it
  301. possible to sum each 16-bit word with only  two  instructions:  a
  302. LODSW to fetch the word from memory and an ADC to add it plus the
  303. carry from the previous addition to the  running  checksum.  Loop
  304. ``unwinding'' further enhances performance.
  305.  
  306.      I usually try to avoid assembler code when possible  because
  307. of  its  inherent  nonportability.   The problem isn't so much in
  308. porting to machines completely  different  from  the  PC;  device
  309. drivers tend to be (necessarily) hardware dependent, so they have
  310. to be rewritten anyway. The main headache has been nonportability
  311. to  the various C compilers on the PC.  For example, Aztec C pro-
  312. vides a macro package that makes it very easy to write C-callable
  313. assembler  routines.   These  macros automatically ``do the right
  314. thing'' for each of  the  8086's  ``billyuns  and  billyuns''  of
  315. memory  models.   Unfortunately, a compatible set of macros isn't
  316. available with the other compilers, so  Russ  Nelson  contributed
  317. quite  a bit of time and effort in porting the assembler routines
  318. to Turbo-C.
  319.  
  320. _3._3.  _I_m_p_r_o_v_e_d _O_p_e_r_a_t_i_n_g _S_y_s_t_e_m _P_o_r_t_a_b_i_l_i_t_y
  321.  
  322.      We have tried to improve portability  to  operating  systems
  323. and compilers other than MS-DOS and Aztec C.  We found this to be
  324. much harder than simple CPU portability since file system, native
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337. I/O device support and C subroutine library dependencies appeared
  338. in widely scattered parts of the package.  For example, while the
  339. Apple  Macintosh,  MS-DOS  and UNIX all provide hierarchical file
  340. systems, the Mac uses the colon (:) to separate  path  name  com-
  341. ponents  while  UNIX  uses the slash (/) and MS-DOS the backslash
  342. (\).  Although many of these problems quickly became obvious once
  343. a  porting  effort  had  begun,  it was unexpectedly difficult to
  344. identify them in advance.  A  typical  porting  effort  therefore
  345. goes  through  several  iterations  with the goal of isolating as
  346. much system-dependent code as  possible  to  a  small  number  of
  347. files.   We have partially succeeded in this, but there are still
  348. many  #ifdefs  (conditional   compilation   segments)   scattered
  349. throughout  the code.  This should improve as the package matures
  350. further.
  351.  
  352.      Porting has involved the efforts of several  people.   Mikel
  353. Matthews,  N9DVG,  did  the initial ports to the Apple Macintosh,
  354. UNIX System V and the Commodore Amiga.  A group in the San  Fran-
  355. cisco  Bay  area  including  Dewayne  Hendricks,  WA8DZP and Andy
  356. Cromarty, N6JLJ has made further improvements  and  additions  to
  357. the Macintosh version, and Bob Hoffman, N3CVL is now coordinating
  358. changes to the UNIX version.  There are undoubtedly others  work-
  359. ing on porting efforts of which I am unaware.
  360.  
  361. _4.  _O_p_e_r_a_t_i_o_n_a_l _E_x_p_e_r_i_e_n_c_e
  362.  
  363.      Most on-air TCP/IP  operation  to  date  consists  of  local
  364. ``islands'' of activity that cover metropolitan areas or regions.
  365. The facilities used  in  each  area  are  diverse;  some  use  IP
  366. switches  almost  exclusively, others use various combinations of
  367. analog (FM) repeaters, IP switches, AX.25 digipeaters and NET/ROM
  368. nodes.   Most  activity  uses  the  1200 baud AFSK format, simply
  369. because the equipment is so widely available.  The  GRAPES  group
  370. in  Atlanta  has  pioneered  the use of the 56 kbps modem by Dale
  371. Heatherington, WA4DSY, and TCP/IP has been its  primary  applica-
  372. tion.
  373.  
  374.      As expected, the Internet approach has proven highly  versa-
  375. tile  in  adapting  to  these heterogeneous environments.  Once a
  376. system has been properly configured, its user merely issues  net-
  377. work  commands  that  specify  the system with which he wishes to
  378. communicate; he  need  not  be  continually  concerned  with  the
  379. idiosyncrasies of his local network.
  380.  
  381. _4._1.  _C_o_l_l_i_s_i_o_n _F_r_e_e _N_e_t_w_o_r_k_s
  382.  
  383.      The ``collision free backbone'' technique described at  last
  384. year's conference has been implemented in an experimental node in
  385. northern New Jersey.  Our site receives on  two  UHF  frequencies
  386. (431.025  and 440.950 MHz) and transmits on 221.07 MHz; crossband
  387. operation allows it to receive and transmit simultaneously.  This
  388. technique works, although good performance still requires good RF
  389. links.  It is interesting to hear this site in operation for  the
  390. first   time;   instead  of  the  short  bursts  of  useful  data
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403. interspersed with collisions, idle flag streams and squelch tails
  404. one  is  accustomed  to  hearing  on regular packet channels, the
  405. switch's carrier can stay on continuously for minutes at  a  time
  406. during  a  file  transfer, relaying back-to-back data packets and
  407. acknowledgements.
  408.  
  409. _4._2.  _R_a_d_i_o/_W_i_r_e _I_n_t_e_r_n_e_t_t_i_n_g
  410.  
  411.      Some   experimental   linking   between   different   TCP/IP
  412. ``islands''  has been done with GTE Telenet's PC Pursuit service.
  413. This inexpensive service provides slow speed  (1200  baud)  asyn-
  414. chronous  communication  across  Telenet's  X.25  network  during
  415. nights and weekends when excess capacity is available.  Since  PC
  416. Pursuit  provides  a  (logically  transparent) asynchronous ``bit
  417. pipe'' between its endpoints, it handles SLIP  (Serial  Line  IP)
  418. just  fine.   A  station in each area acts as a gateway, relaying
  419. packets between the local packet radio channel and the  telephone
  420. line. When more than one telephone line and modem is available at
  421. a given station, that  site  can  act  as  a  ``hub'',  switching
  422. datagrams from one phone line to another as well as between phone
  423. line and radio channel. These experiments clearly demonstrate  an
  424. ability to establish an emergency packet switching network out of
  425. ad-hoc combinations of telephone lines and radio channels.
  426.  
  427. _4._3.  _P_o_l_i_t_i_c_s
  428.  
  429.      Certain TCP/IP groups have unfortunately  encountered  occa-
  430. sional  friction, especially in areas where TCP/IP activity coex-
  431. ists with conventional AX.25 activity.  The  complaints  seem  to
  432. fall  into  two categories: channel loading and ``garbage charac-
  433. ters'', but neither problem is unique to TCP/IP.  Channel loading
  434. is a potential problem wherever interactive traffic competes with
  435. file transfer traffic for a low speed channel.   One  feature  of
  436. the  TCP/IP  package  that  alleviates this problem somewhat with
  437. respect to regular AX.25 users is that TCP ``backs off'' exponen-
  438. tially  whenever  it  loses  a  packet, i.e., it doubles the time
  439. between each successive attempt.  This makes TCP far less aggres-
  440. sive on a heavily loaded channel than a regular AX.25 TNC.
  441.  
  442.      Complaints  about  ``garbage  characters''  occur  when  the
  443. binary  headers of IP or TCP are seen by stations passively moni-
  444. toring the channel with regular TNCs.  Such  complaints  are  not
  445. limited  to  TCP/IP;  any high level networking scheme, including
  446. NET/ROM, has similar  problems,  as  do  binary  file  transfers.
  447. Clearly the correct solution lies with more flexible packet moni-
  448. toring code in the TNCs, as enough information  is  available  in
  449. each  AX.25  packet  header  (specifically  in  the PID field) to
  450. determine what higher level protocol is in use.
  451.  
  452. _5.  _W_o_r_k _i_n _P_r_o_g_r_e_s_s
  453.  
  454.      This section discusses some of the ideas and goals  for  the
  455. package  that  are  currently being thought about or implemented.
  456. These cover a variety of items, both hardware and software.
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469. _5._1.  _M_u_l_t_i_t_a_s_k_i_n_g _o_p_e_r_a_t_i_n_g _s_y_s_t_e_m
  470.  
  471.      Net.exe has long been structured as  a  ``commutator  loop''
  472. that  relies  on upcalls and polling.  Hardware interrupts simply
  473. transfer data between devices and queues that are operated on  by
  474. routines  called  from the main loop.  (See my earlier papers for
  475. further details).
  476.  
  477.      Each application presently provides functions (entry points)
  478. that  are called asynchronously by the transport protocol modules
  479. when external events occur.  Applications are  not  permitted  to
  480. ``busy-wait'',  and  they must explicitly save state in ``control
  481. blocks'' so that each call is interpreted properly.   This  tech-
  482. nique worked surprisingly well for the existing applications (the
  483. DARPA FTP, Telnet and SMTP protocols) but it can be clumsy.
  484.  
  485.      With many expressing interest in using the package as a base
  486. for  more complex applications (e.g., multi-user W0RLI-style bul-
  487. letin boards) I have begun to restructure the  package  around  a
  488. multi-tasking  kernel.  This  will  provide a simpler programming
  489. environment more like that of a conventional multitasking system.
  490. Net.exe  will  remain  a single executable file containing all of
  491. the applications linked together, and it will still run  under  a
  492. higher level multitasker such as Desqview or DoubleDos.
  493.  
  494.      New ``synchronous blocking'' primitives more like  those  in
  495. conventional  multitasking  operating  systems  will be provided.
  496. For example, calls  to  the  network  ``receive''  function  will
  497. block,  if  necessary,  until  data  is available.  When one task
  498. blocks, others (if any) will be run automatically.
  499.  
  500.      The operating system kernel will be  non  preemptive.   That
  501. is,  once  a task gains control it runs until it explicitly gives
  502. up the processor by executing a ``wait'' primitive (e.g.,  inside
  503. the  tcp_read  subroutine).  A CPU-intensive task can also volun-
  504. tarily relinquish the processor, allowing  other  tasks  to  run,
  505. without  actually waiting for an event. Choosing a non-preemptive
  506. kernel greatly simplifies the design of the rest of  the  system,
  507. since ``critical sections'' are almost eliminated. (Critical sec-
  508. tions are those sections of a program where a hardware  interrupt
  509. followed  by  a  task  switch  would  leave data structures in an
  510. inconsistent state, usually causing  a  system  crash.   Critical
  511. sections  can  be  notoriously hard to find, since interrupts are
  512. semi-random external events).
  513.  
  514.      Most multitasking kernels require  some  assembler  language
  515. code  for  saving  and  restoring a task's registers but the non-
  516. preemptive approach combined with a very clever  trick  suggested
  517. by  Rob,  PE1CHL  allows  this  to  be  done  with the standard C
  518. library's setjmp/longjmp mechanism.   This  technique  makes  the
  519. resulting code much more portable, thereby avoiding the main rea-
  520. son I decided against a multitasking kernel at the  beginning  of
  521. the project.
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535. _5._2.  _W_h_e_r_e _I_s _M_y _H_i_g_h _S_p_e_e_d _D_i_g_i_t_a_l?
  536.  
  537.      TCP/IP users feel the limitations of  1200  baud  much  more
  538. acutely  than most packeteers, mainly because of the extreme ease
  539. with which parallel operations and large file  transfers  can  be
  540. commanded.  The problem is much like that of running UNIX or some
  541. other powerful timesharing system on  a  PC/XT.   Even  though  a
  542. specific  program  might  run just as fast as under a single-user
  543. system like MS-DOS, the system quickly runs out of gas  when  the
  544. much  more  powerful features of the timesharing system are exer-
  545. cised.
  546.  
  547.      Dale Heatherington, WA4DSY, has made an  enormous  contribu-
  548. tion toward solving the raw RF link bandwidth problem with his 56
  549. kilobit MSK modem design.  I have built several of these  modems,
  550. and  they  certainly work as advertised.  On Ethernet, the TCP/IP
  551. package transfers a file between a pair of IBM  PC/ATs  at  about
  552. 250  kilobits  per second.  This is by no means blazingly fast by
  553. Ethernet standards (the code  was  written  for  portability  and
  554. flexibility,  not  maximum speed) but it should certainly be able
  555. to keep a mere 56 kilobit modem occupied.   But  Ethernet  inter-
  556. faces  are  fairly  smart  devices  designed  for fast transfers;
  557. unfortunately there is as yet no readily available serial  inter-
  558. face for the WA4DSY modem with the capacity these modems provide!
  559. (Those who saw the original Dayton  announcement  of  the  WA4DSY
  560. modem  may  remember  its  subtitle: ``Where, Oh Where Is My High
  561. Speed Digital?'')
  562.  
  563.      The standard asynchronous serial  ports  found  on  personal
  564. computers cannot be used directly with Dale's modem as it is syn-
  565. chronous (as is regular 1200 baud packet).  The Atlanta group has
  566. had  moderate  success by modifying standard TNC-2s to operate at
  567. 56kbps on the radio side, but they are  still  limited  to  rela-
  568. tively  low  data rates (e.g., 19200 bps) between the TNC and the
  569. host computer.  This prevents full use of the modem's capacity.
  570.  
  571.      It is better to eliminate the TNC entirely and use an inter-
  572. face  card on the PC to generate HDLC that can be fed directly to
  573. the modem.  Several HDLC cards already exist, including the  HAPN
  574. 8273  card,  the  PACCOMM PC-100, the DRSI PCPA and the aforemen-
  575. tioned Eagle card.  However, none of these  cards  work  well  at
  576. high speeds, because the PC's DMA (direct memory access) facility
  577. is  insufficient  to  support  these  cards  without   additional
  578. hardware.  Interrupt driven transfers are entirely appropriate at
  579. lower  speeds,  but  at  56  kbps  a  byte  arrives   every   142
  580. microseconds;  that  is  not much time on a 4.77 Mhz 8088 to save
  581. state, process an interrupt  and  return.   Making  matters  much
  582. worse  is  that much PC system code disables interrupts for rela-
  583. tively long  intervals  (consider  disk  transfers),  effectively
  584. ``starving'' a hungry high speed modem.
  585.  
  586.      It _i_s possible to make one of these simple cards operate  in
  587. half  duplex at 56 kbps -- after a fashion.  I am presently writ-
  588. ing a driver for the DRSI PCPA that will run at 56 kbps,  but  it
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601. requires  that  interrupts  be inhibited during any active packet
  602. transfer.  Packet transmission and reception are both  done  with
  603. ``busy waits''; the transmit routine is invoked whenever a packet
  604. is to be sent while the receive routine is invoked by the appear-
  605. ance of a receive carrier.  (This has an unfortunate side effect:
  606. open the demodulator squelch and the system ``hangs''  until  the
  607. squelch closes).
  608.  
  609.      The proper long-term solution to  the  ``Where  Is  My  High
  610. Speed  Digital''  problem lies with hardware: a special ``slave''
  611. processor  board  with  sufficient  intelligence,  buffering  and
  612. autonomy  to  handle  several  seconds'  worth of packets without
  613. immediate assistance from the host  processor.   Mike  Chepponis,
  614. K3MC,  has  been  working  on the design of such a board, and his
  615. paper on this subject appears in these proceedings.   His  design
  616. appears sufficient for speeds considerably faster than 56 kbps as
  617. well.
  618.  
  619. _5._3.  _R_o_u_t_i_n_g
  620.  
  621.      Saying that automatic routing is a ``fertile research area''
  622. in  the  professional  computer  science community is like saying
  623. that Antarctica has a lot of ice.  Much practical experience  has
  624. been  gained from many commercial, military and research computer
  625. networks that can now be applied to amateur packet radio,  and  I
  626. would  like  to  offer  some thoughts on how the static, manually
  627. controlled routing in the TCP/IP package might be replaced.
  628.  
  629.      As mentioned in the section on RIP, many existing  networks,
  630. including  NET/ROM,  use  a  routing  algorithm that is variously
  631. known as  ``Bellman-Ford'',  ``Distance  Vector''  or  ``The  Old
  632. ARPANET Algorithm''.  Each node broadcasts its routing table, the
  633. entries of which list each destination in the  network  and  that
  634. node's  current  estimate  of  the  ``cost'' to that destination.
  635. This algorithm is known to have many problems in  practice,  par-
  636. ticularly  with  susceptibility to routing loops when links fail.
  637. Radio creates a few problems of its own,  including  particularly
  638. flakey links and non-reciprocal paths.
  639.  
  640.      A different algorithm, known variously as ``Dijkstra's algo-
  641. rithm,''  ``Link  State  Routing,''  ``SPF'' or ``The New ARPANET
  642. Algorithm'' may offer an alternative.   In  link  state  routing,
  643. each node broadcasts to all other nodes the status of each of its
  644. local links.  Each node receives  the  broadcasts  of  the  other
  645. nodes  and constructs a complete map of the network from which it
  646. may make local routing decisions.  The broadcast mechanism is  in
  647. fact implemented with ``intelligent flooding'', where an incoming
  648. packet is relayed by a node to each of its neighbors only if that
  649. packet  hasn't  been  previously seen.  (This mechanism has other
  650. uses, such as the provision of a user broadcast mechanism).
  651.  
  652.      The only special problem radio presents to this algorithm is
  653. how to determine whether a link is ``up'' or ``down''.  Just hav-
  654. ing an active AX.25 connection isn't enough; it might  have  been
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667. idle  for  several hours, so there's no way to know if it's still
  668. good or not.  Continually transmitting link test packets (``ping-
  669. ing'')  is  not a particularly good idea, for fairly obvious rea-
  670. sons.  Here an idea from the DARPA packet radio  projects  should
  671. be  very  helpful.   Each  node  only has to broadcast a periodic
  672. report listing the stations it has heard in the last  N  minutes,
  673. with  a count of the number of packets seen from each.  Each sta-
  674. tion mentioned in the report can then compare that number against
  675. the  number  it  actually transmitted, gauging the reliability of
  676. that particular path.  If the percentage is high enough,  it  can
  677. consider  the  link  to  be ``up''; otherwise it is ``down''.  Or
  678. intermediate figures representing link ``quality'' could be used.
  679. Clearly  there  is plenty of interesting and useful work that can
  680. be done here.
  681.  
  682. _6.  _C_o_n_c_l_u_d_i_n_g _T_h_o_u_g_h_t_s
  683.  
  684.      Bringing TCP/IP to amateur  radio  has  been  a  very  time-
  685. consuming  task,  but  its  acceptance has been a most gratifying
  686. reward.  Many challenges still remain, and not all  of  them  are
  687. technical.   We have learned and demonstrated many things so far.
  688. We have proven that TCP/IP is indeed a  practical  and  versatile
  689. foundation for the more advanced amateur packet applications, but
  690. we have also learned that many other packeteers  do  not  as  yet
  691. feel  that  they  need its capabilities.  There now seems to be a
  692. growing awareness within amateur packet radio that,  at  present,
  693. no  one  approach  satisfies  everyone's  needs and that there is
  694. plenty of room for parallel, complementary approaches.   As  more
  695. powerful  hardware becomes popular, though, I do believe that the
  696. ``computer networking'' philosophy as demonstrated by the  TCP/IP
  697. project  will  gradually  replace the more traditional ``terminal
  698. networking'' systems we have now.
  699.  
  700.      The KA9Q Internet package continues to be available  on  the
  701. same  terms:  it may be freely copied, used and modified for ama-
  702. teur or other noncommercial use.  Commercial use of any  part  of
  703. the  package  requires  permission  of  the appropriate author or
  704. authors.
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727. 
  728.